<!--<?php
include_once uTemplate::PrintEot('header');
include_once uTemplate::PrintEot('space_appleft');
$privacy = array('全站可见','仅好友可见','仅自己可见');
print <<<EOT
-->
<div class="sideD">
<!--
EOT;
if(!$indexRight && $indexValue =='1'){print <<<EOT
-->
<div class="boxA">
	<table width="100%">
		<tr><td height="400">
			<div class="space_msg"><img src="u/images/space/report.png" align="absmiddle" />由于对方的隐私设置，容许好友可见！立即 <a href="$db_bbsurl/pw_ajax.php?action=addfriend&touid={$space['uid']}" onclick="return ajaxurl(this);">加为好友</a></div>
		</td></tr>
	</table>
</div>
<!--
EOT;
}elseif(!$indexRight && $indexValue =='2'){print <<<EOT
-->
<div class="boxA">
	<table width="100%">
		<tr><td height="400">
			<div class="space_msg"><img src="u/images/space/report.png" align="absmiddle" />对方设置了隐私，您没有权限查看</div>
		</td></tr>
	</table>
</div>
<!--
EOT;
}else{print <<<EOT
-->
	<div class="boxA">
		<h2><span class="mr10">日志</span></h2>
		<div class="p10 cc">
<!--
EOT;
if ($a == 'list') {print <<<EOT
-->
			<div class="contentC fl">
				<div class="dlB">
<!--
EOT;
if($diaryDb){
foreach($diaryDb as $value){
$typename = !$value[dtid] ?  '默认分类' : $diaryType[$value[dtid]][name];
!$value[dtid] && $value[dtid] = '-1';
$title = '所属:'.$value[username].'&nbsp;'.$value[title];
$descrip = $value[subject];
print <<<EOT
-->
					<dl class="dl">
						<dt class="dt mb10">
<!--
EOT;
if ($space['uid'] == $winduid || $SYSTEM['deldiary']) {print <<<EOT
-->
							<a class="adel" href="javascript:;" onclick="pwConfirm('是否确认删除？',this,function(){delDiary('$value[did]','$value[uid]')})">删除</a>
<!--
EOT;
}print <<<EOT
-->

							<div class="mb5"><a href="{$basename}a=detail&did=$value[did]" class="f16 b">{$value[subject]}</a></div>
							<div class="gray">{$value[postdate]}</div>
						</dt>
						<dd class="dd">
							<p class="mb20">{$value[content]}</p>
							<cite class="gray"><a href="{$basename}a=detail&did=$value[did]" class="s7 fr">阅读全文&raquo;</a>分类：<a class="s7" href="{$basename}dtid=$value[dtid]">{$typename}</a><span class="p_lr_10">|</span>回复：{$value[c_num]}<span class="p_lr_10">|</span>浏览：{$value[r_num]}</cite>
						</dd>
						<dd>
						</dd>
					</dl>
<!--
EOT;
}} else {print <<<EOT
-->					

<!--
EOT;
		if (!$dtid) {print <<<EOT
-->
			<div class="p10 f14 tac">暂无日志！</div>
<!--
EOT;
		} else {print <<<EOT
-->
			<div class="p10 f14 tac">此分类下暂无日志！</div>
<!--
EOT;
		}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
				<div class="p10">$pages</div>
			</div>
			</div>
<!--
EOT;
if ($diaryNums) {print <<<EOT
-->
			<div class="sidebar fr">
				<div class="boxC">
					<h3>日志分类</h3>
					<ul class="ulE">
						<li id="dt_all"><a href="{$basename}">全部日志</a>[{$diaryNums}]</li>
<!--
EOT;
$dtype = $dtid;
foreach($diaryType as $value){
print <<<EOT
-->
						<li id="dt_{$value[dtid]}"><a href="{$basename}dtid={$value[dtid]}">$value[name]</a>[{$value[num]}]</li>
<!--
EOT;
}print <<<EOT
-->
						<li id="dt_-1"}><a href="{$basename}dtid=-1">默认分类</a>[{$defaultTypeNum}]</li>
<!--
EOT;
if($uid == $winduid){
print <<<EOT
-->
						<li id="dt_-2"><img src="u/images/key.png" align="absmiddle" /> <a href="{$basename}dtid=-2">私密日志</a>[{$privacyNum}]</li>
<!--
EOT;
}print <<<EOT
-->
					</ul>
				</div>
<script language="javascript">
setCurrent('dt_$dtype','dt_all','current');
</script>	        
			</div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
} elseif ($a == 'detail') {print <<<EOT
-->
	<div id="diary_$diary[did]">
				<div class="fr">
					<a href="apps.php?q=collection&a=favor&type=diary&ajax=1&id={$diary['did']}" onclick="return ajaxurl(this)" class="mr20 allCollect">收藏</a>
<!--
EOT;
if ($weiboPriv) {print <<<EOT
-->
<a href="javascript:;" onclick="sendmsg('operate.php?action=toweibo&ajax=1&type=diary&id=$did','',this.id);" class="allForward">新鲜事</a>
<!--
EOT;
}print <<<EOT
-->
				</div>
				<h1 class="mb5">{$diary[subject]}</h1>
<!--
EOT;
if($space['uid'] == $winduid || $SYSTEM['deldiary']){print <<<EOT
-->                     
						<a class="adel" href="javascript:;" onclick="pwConfirm('确认删除？',this,function(){delDiary('$diary[did]','$uid','read')})">删除</a>
														
<!--
EOT;
}print <<<EOT
-->
				<div class="gray mb10">{$diary[postdate]}</div>
				<div class="contentText s5 f14 mb20" id="img-width">
				<table style="table-layout: fixed;"><tr><td height="200" class="vt"><div class="mb10">{$diary[content]}</div>
<!--
EOT;
if($diary['pic']){
foreach($diary['pic'] as $pic){
if($pic){print <<<EOT
-->
				<div class="f12 mb10" id="att_$pic[aid]" style="width:650px;overflow:hidden;">
<!--
EOT;
if($pic['desc']){print <<<EOT
-->
					描述:$pic[desc]<br />
<!--
EOT;
}print <<<EOT
-->
					图片:$pic[img]
<!--
EOT;
if($pic['dfadmin']){print <<<EOT
-->
					[<a style="cursor:pointer" onclick="deldiaryatt('$diary[did]','$pic[aid]');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
				</div>
<!--
EOT;
}}}print <<<EOT
-->
			</td></tr></table>
				</div>
				<div class="mb10">
<!--
EOT;
$typename = !$diary[dtid] ?  '默认分类' : $diaryType[$diary[dtid]][name];
!$diary[dtid] && $diary[dtid] = '-1';
print <<<EOT
--->
						<cite class="gray">分类：<a href="{$basename}dtid=$diary[dtid]" class="s7">{$typename}</a><span class="p_lr_10">|</span>回复：{$diary[c_num]}<span class="p_lr_10">|</span>浏览：{$diary[r_num]}<span class="p_lr_10">|</span>{$privacy[$diary[privacy]]}<!--
EOT;
if ($_G['allowreport']) {print <<<EOT
--><span class="p_lr_10">|</span><a class="mr10 s7" href="javascript:;" onclick="sendmsg('pw_ajax.php?action=report&type=diary&tid=$did&pid=$uid','',this.id);" id="report_diary">举报</a><!--
EOT;
}if($diary[ifcopy] && $space['uid'] != $winduid){print <<<EOT
--><span class="p_lr_10">|</span><a class="mr10 s7" href="{$basename}a=copydiary&did=$diary[did]" onclick="return ajaxurl(this);">转载</a>
<script language="JavaScript">
function ajaxurl(o) {
read.obj = o;
ajax.send(o.href,'',ajax.get);
return false;
}
</script>
<!--
EOT;
}print <<<EOT
-->
					</cite>
				</div>
<!-- 
EOT;
$rateSets = unserialize($db_ratepower);
if($rateSets[2] && isset($db_hackdb['rate'])){
print <<<EOT
-->	 
				<link rel="stylesheet" type="text/css" href="hack/rate/images/rate.css" />
				<script language="JavaScript" src="js/rate_ajax.js"></script>
				<script language="javascript">
				window.onload = function() {
					rate.getVote("vote_box","{$db_bbsurl}/hack.php?H_name=rate&action=ajax","elementid=vote_box&typeid=2&objectid={$did}&authorid={$uid}");
				};
				</script>						
				<div id="vote_box"></div>
<!-- 
EOT;
}
print <<<EOT
-->	
<div class="c mb10">&nbsp;</div>
<div class="cc mb10 seeMore">
	<a class="fl" href="{$basename}a=next&uid={$uid}&did=$diary[did]" onclick="return ajaxpage(this.href,'next','$fuid','$space');">下一篇</a>
	<a  class="fr" href="{$basename}a=pre&uid={$uid}&did=$diary[did]" onclick="return ajaxpage(this.href,'pre','$fuid','$space');">上一篇</a>
</div>
<!--
EOT;
require_once PrintEot('m_comment');print <<<EOT
-->
<script type="text/javascript" language="JavaScript" src="js/pw_lwd.js"></script>
	</div>
<!--
EOT;
}}print <<<EOT
-->
		</div>
	</div>
</div>	
<script language="JavaScript" src="apps/$appdir/js/diarytype.js"></script>
<script language="JavaScript" src="js/app_comment.js"></script>
<!--
EOT;
require_once uTemplate::printEot('footer');
pwOutPut();
?>-->